package com.example.springstudy.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Date;
/**
 * @author jiujiu
 * @PropertySource 加载局部配置文件，映射到此类中(貌似只支持*.properties)
 */
@Data
@PropertySource(value = {"classpath:users.properties"})
@Component
@ConfigurationProperties(prefix = "users")
public class Users {
    private String names;
    private String sex;
    private Date birthday;
}
